package io.gitee.twoke.generator.engine.impl.persistence.entity;

import io.gitee.twoke.generator.engine.impl.cfg.GenerateEngineConfigurationImpl;
import io.gitee.twoke.generator.engine.impl.generate.DataTableColumn;
import io.gitee.twoke.generator.engine.impl.generate.impl.DataTableColumnQueryImpl;
import io.gitee.twoke.generator.engine.impl.persistence.DataTableColumnDataManager;
import io.gitee.twoke.generator.engine.impl.persistence.entity.data.DataManager;

import java.util.List;

public class DataTableColumnEntityManagerImpl extends AbstractEntityManager<DataTableColumnEntity> implements DataTableColumnEntityManager {

    protected DataTableColumnDataManager dataManager;

    public DataTableColumnEntityManagerImpl(GenerateEngineConfigurationImpl generateEngineConfiguration,
    DataTableColumnDataManager dataManager) {
    super(generateEngineConfiguration);
    this.dataManager = dataManager;
    }

    @Override
    protected DataManager<DataTableColumnEntity> getDataManager() {
        return dataManager;
    }

    @Override
    public long findDataTableColumnCountByQueryCriteria(DataTableColumnQueryImpl dataTableColumnQuery) {
        return dataManager.findDataTableColumnCountByQueryCriteria(dataTableColumnQuery);
    }

    @Override
    public List<DataTableColumn> findDataTableColumnsByQueryCriteria(DataTableColumnQueryImpl dataTableColumnQuery) {
        return dataManager.findDataTableColumnsByQueryCriteria(dataTableColumnQuery);
    }
}